const token = {
  admin: 'admin',
  editor: 'editor',
}

export default [
  {
    url: '/mock/cache/token',  // 请求地址
    method: 'post',  // 请求方式
    response: ({ body }) => {
      if (['admin', 'editor'].includes(body?.name)) {
        return { code: 200, data: { token: token[body.name] } }
      } else {
        return { code: -1, message: '没有此用户' }
      }
    },
  }
]
